﻿using System;

namespace WiMo.Games.Drawables
{
    public enum RenderStrategy
    {
        Quality,
        Standard,
        Fast
    }

    public interface IDrawable : IPositionable, IRotatable, IScalable, IDisposable
    {
        /// <summary>
        /// 
        /// </summary>
        RenderStrategy RenderStrategy { get; set; }

        /// <summary>
        /// If the IsTransient flag is set the sprite will ownly be drawn for the current
        /// render cycle, this means it can be disposed after being rendered.
        /// </summary>
        bool IsTransient { get; set; }

        /// <summary>
        /// Does the sprite need to be re-painted.
        /// </summary>
        bool IsDirty { get; set; }        

        /// <summary>
        /// Did the sprite move, do we need to check for collisions
        /// </summary>
        bool Moved { get; set; }

        void Render(IDisplay display);
        /// <summary>
        /// Used to keep information necessary to render the sprite.  This can be used by the DrawEngine to contain specific data such as layers or bitmaps.
        /// </summary>
        object DrawInformation { get; set; }
        /// <summary>
        /// Call this method to let the render engine know that this script has changed in some way.  Generally the application
        /// will not need to do this, setting properties on the sprite should do this.
        /// </summary>
        /// <returns></returns>
        void Invalidate();

        /// <summary>
        /// Draw order for the sprite.
        /// </summary>
        int ZIndex { get; set; }

        Color ColorKey { get; set; }
    }
}
